package com.ke.jun.view.widght

import android.content.Context
import android.graphics.Canvas
import android.graphics.Color
import android.graphics.Paint
import android.util.AttributeSet
import android.view.View

class DrawView@JvmOverloads constructor(context: Context, attributeSet: AttributeSet?=null,
            defStyleAttr:Int=0): View(context,attributeSet,defStyleAttr) {
    /**
     * 设置圆心的位置
     */
     private val circleX=40f
     private val circleY=50f
    private  val circleR=15f

    override fun onDraw(canvas: Canvas?) {
        super.onDraw(canvas)
        var paint = Paint()
        paint.color = Color.RED
        canvas?.drawCircle(circleX,circleY,circleR,paint)
    }


}